# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeleteFeatureValuesRequestSelectTimeRangeAndFeature do
  @moduledoc """
  Message to select time range and feature. Values of the selected feature generated within an inclusive time range will be deleted. Using this option permanently deletes the feature values from the specified feature IDs within the specified time range. This might include data from the online storage. If you want to retain any deleted historical data in the online storage, you must re-ingest it.

  ## Attributes

  *   `featureSelector` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureSelector.t`, *default:* `nil`) - Required. Selectors choosing which feature values to be deleted from the EntityType.
  *   `skipOnlineStorageDelete` (*type:* `boolean()`, *default:* `nil`) - If set, data will not be deleted from online storage. When time range is older than the data in online storage, setting this to be true will make the deletion have no impact on online serving.
  *   `timeRange` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleTypeInterval.t`, *default:* `nil`) - Required. Select feature generated within a half-inclusive time range. The time range is lower inclusive and upper exclusive.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :featureSelector =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureSelector.t() | nil,
          :skipOnlineStorageDelete => boolean() | nil,
          :timeRange => GoogleApi.AIPlatform.V1.Model.GoogleTypeInterval.t() | nil
        }

  field(:featureSelector, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureSelector)

  field(:skipOnlineStorageDelete)
  field(:timeRange, as: GoogleApi.AIPlatform.V1.Model.GoogleTypeInterval)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeleteFeatureValuesRequestSelectTimeRangeAndFeature do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeleteFeatureValuesRequestSelectTimeRangeAndFeature.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeleteFeatureValuesRequestSelectTimeRangeAndFeature do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
